package dao;

import domain.Traveller;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Freedy
 * @date 2020/12/23 22:53
 */
public interface ITravellerDao {

    /**
     * 根据OrdersId查询游客信息
     * @param ordersId
     * @return
     * @throws Exception
     */
    @Select("select * from traveller where" +
            " id in (select travellerId  from order_traveller where orderId=#{ordersId});")
    List<Traveller> findByOrdersId(int ordersId) throws Exception;
}
